#ifndef _CINPUT_H
#define _CINPUT_H

#include "dinput.h"
#include "d3d9.h"


class CInput
{
private:
	//----------------------------------//
	// Private variables for this class //
	//----------------------------------//
	IDirectInput8			*m_pInput;
	IDirectInputDevice8		*m_pKeyboardDevice;
	IDirectInputDevice8		*m_pMouseDevice;
	char					 keys[256];
	DIMOUSESTATE2			 m_MouseState;

public:
	//-------------------------------------------//
	// Constructor and Destructor for this class //
	//-------------------------------------------//
	CInput();
	~CInput();

	//-------------------------------//
	// Public methods for this class //
	//-------------------------------//

	//Create Input methods
	bool	CreateInput				();

	//KeyBoard processing methods
	
	bool	InitKeyboard			( HWND hwnd );
	int		IsKeyDown				( int keycode );
	void	ProcessKey				( HWND hwnd );

	//Mouse processing methods
	bool	InitMouse				( HWND hwnd );
	void	GetMouse				();
	bool	mouseButtonDown			(int button);
	float	mouseDX					();
	float	mouseDY					();
	float	mouseDZ					();

	//Release methods
	void	Release					();
};

#endif